<!-- 5*:实现时间的显示功能，
要求能显示星期几，年月日，小时分钟秒,并能随着时间的变化而变化。。。 -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>实时时间</title>
	</head>
	<body>
		<div id="time">
		</div>
		<script type="text/javascript">
			function time() {
				var vWeek, vWeek_s, vDay;
				vWeek = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
				var date = new Date();
				year = date.getFullYear();
				month = date.getMonth() + 1;
				day = date.getDate();
				hours = date.getHours();
				minutes = date.getMinutes();
				seconds = date.getSeconds();
				vWeek_s = date.getDay();
				document.getElementById("time").innerHTML = year + "年" + month + "月" + day + "日" +
					"\t" + hours + ":" +
					minutes + ":" + seconds + "\t" + vWeek[vWeek_s];
			};
			setInterval("time()", 1000);
		</script>
	</body>
</html>
